\doxysection{arm\+\_\+helium\+\_\+utils.\+h}
\hypertarget{arm__helium__utils_8h_source}{}\label{arm__helium__utils_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/ST/ARM/DSP/Include/arm\_helium\_utils.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/ST/ARM/DSP/Include/arm\_helium\_utils.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ Project:\ \ \ \ \ \ CMSIS\ DSP\ Library}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Title:\ \ \ \ \ \ \ \ arm\_helium\_utils.h}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ Description:\ \ Utility\ functions\ for\ Helium\ development}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ @version\ \ V1.10.0}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ @date\ \ \ \ \ 08\ July\ 2021}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ Target\ Processor:\ Cortex-\/M\ and\ Cortex-\/A\ cores}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/\ */}}
\DoxyCodeLine{00011\ \textcolor{comment}{/*}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ Copyright\ (C)\ 2010-\/2021\ ARM\ Limited\ or\ its\ affiliates.\ All\ rights\ reserved.}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ SPDX-\/License-\/Identifier:\ Apache-\/2.0}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ Licensed\ under\ the\ Apache\ License,\ Version\ 2.0\ (the\ License);\ you\ may}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ not\ use\ this\ file\ except\ in\ compliance\ with\ the\ License.}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ You\ may\ obtain\ a\ copy\ of\ the\ License\ at}}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ www.apache.org/licenses/LICENSE-\/2.0}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ Unless\ required\ by\ applicable\ law\ or\ agreed\ to\ in\ writing,\ software}}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ distributed\ under\ the\ License\ is\ distributed\ on\ an\ AS\ IS\ BASIS,\ WITHOUT}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ WARRANTIES\ OR\ CONDITIONS\ OF\ ANY\ KIND,\ either\ express\ or\ implied.}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ See\ the\ License\ for\ the\ specific\ language\ governing\ permissions\ and}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ limitations\ under\ the\ License.}}
\DoxyCodeLine{00027\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#ifndef\ \_ARM\_UTILS\_HELIUM\_H\_}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#define\ \_ARM\_UTILS\_HELIUM\_H\_}}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#ifdef\ \ \ \_\_cplusplus}}
\DoxyCodeLine{00034\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}}
\DoxyCodeLine{00035\ \{}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00037\ \textcolor{comment}{/***************************************}}
\DoxyCodeLine{00038\ \textcolor{comment}{}}
\DoxyCodeLine{00039\ \textcolor{comment}{Definitions\ available\ for\ MVEF\ and\ MVEI}}
\DoxyCodeLine{00040\ \textcolor{comment}{}}
\DoxyCodeLine{00041\ \textcolor{comment}{***************************************/}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#if\ (defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEF)\ ||\ defined(ARM\_MATH\_MVEI))\ \ \&\&\ !defined(ARM\_MATH\_AUTOVECTORIZE)}}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#define\ INACTIVELANE\ \ \ \ \ \ \ \ \ \ \ \ 0\ }\textcolor{comment}{/*\ inactive\ lane\ content\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEF)\ ||\ defined(ARM\_MATH\_MVEI)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \textcolor{comment}{/***************************************}}
\DoxyCodeLine{00050\ \textcolor{comment}{}}
\DoxyCodeLine{00051\ \textcolor{comment}{Definitions\ available\ for\ MVEF\ only}}
\DoxyCodeLine{00052\ \textcolor{comment}{}}
\DoxyCodeLine{00053\ \textcolor{comment}{***************************************/}}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#if\ (defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEF))\ \ \&\&\ !defined(ARM\_MATH\_AUTOVECTORIZE)}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \_\_STATIC\_FORCEINLINE\ float32\_t\ vecAddAcrossF32Mve(float32x4\_t\ in)}
\DoxyCodeLine{00057\ \{}
\DoxyCodeLine{00058\ \ \ \ \ float32\_t\ acc;}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00060\ \ \ \ \ acc\ =\ vgetq\_lane(in,\ 0)\ +\ vgetq\_lane(in,\ 1)\ +}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ vgetq\_lane(in,\ 2)\ +\ vgetq\_lane(in,\ 3);}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordflow}{return}\ acc;}
\DoxyCodeLine{00064\ \}}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00069\ \textcolor{comment}{/*\ newton\ initial\ guess\ */}}
\DoxyCodeLine{00070\ \textcolor{preprocessor}{\#define\ INVSQRT\_MAGIC\_F32\ \ \ \ \ \ \ \ \ \ \ 0x5f3759df}}
\DoxyCodeLine{00071\ \textcolor{preprocessor}{\#define\ INV\_NEWTON\_INIT\_F32\ \ \ \ \ \ \ \ \ 0x7EF127EA}}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{preprocessor}{\#define\ INVSQRT\_NEWTON\_MVE\_F32(invSqrt,\ xHalf,\ xStart)\(\backslash\)}}
\DoxyCodeLine{00075\ \textcolor{preprocessor}{\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00076\ \textcolor{preprocessor}{\ \ \ \ float32x4\_t\ tmp;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ tmp\ =\ xhalf\ *\ x\ *\ x\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00079\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vmulq(xStart,\ xStart);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00080\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vmulq(tmp,\ xHalf);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00081\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ (1.5f\ -\/\ xhalf\ *\ x\ *\ x)\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00082\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vsubq(vdupq\_n\_f32(1.5f),\ tmp);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ x\ =\ x*(1.5f-\/xhalf*x*x);\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\ \ \ \ invSqrt\ =\ vmulq(tmp,\ xStart);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00085\ \textcolor{preprocessor}{\}}}
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEF)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00087\ }
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \textcolor{comment}{/***************************************}}
\DoxyCodeLine{00090\ \textcolor{comment}{}}
\DoxyCodeLine{00091\ \textcolor{comment}{Definitions\ available\ for\ f16\ datatype\ with\ HW\ acceleration\ only}}
\DoxyCodeLine{00092\ \textcolor{comment}{}}
\DoxyCodeLine{00093\ \textcolor{comment}{***************************************/}}
\DoxyCodeLine{00094\ \textcolor{preprocessor}{\#if\ defined(ARM\_FLOAT16\_SUPPORTED)}}
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#if\ defined\ (ARM\_MATH\_MVE\_FLOAT16)\ \&\&\ !defined(ARM\_MATH\_AUTOVECTORIZE)}}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00097\ \_\_STATIC\_FORCEINLINE\ float16\_t\ vecAddAcrossF16Mve(float16x8\_t\ in)}
\DoxyCodeLine{00098\ \{}
\DoxyCodeLine{00099\ \ \ \ \ float16x8\_t\ tmpVec;}
\DoxyCodeLine{00100\ \ \ \ \ \_Float16\ acc;}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ tmpVec\ =\ (float16x8\_t)\ vrev32q\_s16((int16x8\_t)\ in);}
\DoxyCodeLine{00103\ \ \ \ \ in\ =\ vaddq\_f16(tmpVec,\ in);}
\DoxyCodeLine{00104\ \ \ \ \ tmpVec\ =\ (float16x8\_t)\ vrev64q\_s32((int32x4\_t)\ in);}
\DoxyCodeLine{00105\ \ \ \ \ in\ =\ vaddq\_f16(tmpVec,\ in);}
\DoxyCodeLine{00106\ \ \ \ \ acc\ =\ (\_Float16)vgetq\_lane\_f16(in,\ 0)\ +\ (\_Float16)vgetq\_lane\_f16(in,\ 4);}
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordflow}{return}\ acc;}
\DoxyCodeLine{00109\ \}}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00111\ \_\_STATIC\_FORCEINLINE\ float16x8\_t\ \_\_mve\_cmplx\_sum\_intra\_vec\_f16(}
\DoxyCodeLine{00112\ \ \ \ \ float16x8\_t\ \ \ vecIn)}
\DoxyCodeLine{00113\ \{}
\DoxyCodeLine{00114\ \ \ \ \ float16x8\_t\ \ \ vecTmp,\ vecOut;}
\DoxyCodeLine{00115\ \ \ \ \ uint32\_t\ \ \ \ tmp;}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ \ \ \ \ vecTmp\ =\ (float16x8\_t)\ vrev64q\_s32((int32x4\_t)\ vecIn);}
\DoxyCodeLine{00118\ \ \ \ \ \textcolor{comment}{//\ TO\ TRACK\ :\ using\ canonical\ addition\ leads\ to\ unefficient\ code\ generation\ for\ f16}}
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{comment}{//\ vecTmp\ =\ vecTmp\ +\ vecAccCpx0;}}
\DoxyCodeLine{00120\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00121\ \textcolor{comment}{\ \ \ \ \ *\ Compute}}
\DoxyCodeLine{00122\ \textcolor{comment}{\ \ \ \ \ *\ \ re0+re1\ |\ im0+im1\ |\ re0+re1\ |\ im0+im1}}
\DoxyCodeLine{00123\ \textcolor{comment}{\ \ \ \ \ *\ \ re2+re3\ |\ im2+im3\ |\ re2+re3\ |\ im2+im3}}
\DoxyCodeLine{00124\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00125\ \ \ \ \ vecTmp\ =\ vaddq\_f16(vecTmp,\ vecIn);}
\DoxyCodeLine{00126\ \ \ \ \ vecOut\ =\ vecTmp;}
\DoxyCodeLine{00127\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00128\ \textcolor{comment}{\ \ \ \ \ *\ shift\ left,\ random\ tmp\ insertion\ in\ bottom}}
\DoxyCodeLine{00129\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00130\ \ \ \ \ vecOut\ =\ vreinterpretq\_f16\_s32(vshlcq\_s32(vreinterpretq\_s32\_f16(vecOut)\ \ \ ,\ \&tmp,\ 32));}
\DoxyCodeLine{00131\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00132\ \textcolor{comment}{\ \ \ \ \ *\ Compute:}}
\DoxyCodeLine{00133\ \textcolor{comment}{\ \ \ \ \ *\ \ \ \ DONTCARE\ \ \ \ \ |\ \ \ \ DONTCARE\ \ \ \ \ |\ re0+re1+re0+re1\ |im0+im1+im0+im1}}
\DoxyCodeLine{00134\ \textcolor{comment}{\ \ \ \ \ *\ re0+re1+re2+re3\ |\ im0+im1+im2+im3\ |\ re2+re3+re2+re3\ |im2+im3+im2+im3}}
\DoxyCodeLine{00135\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00136\ \ \ \ \ vecOut\ =\ vaddq\_f16(vecOut,\ vecTmp);}
\DoxyCodeLine{00137\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00138\ \textcolor{comment}{\ \ \ \ \ *\ Cmplx\ sum\ is\ in\ 4rd\ \&\ 5th\ f16\ elt}}
\DoxyCodeLine{00139\ \textcolor{comment}{\ \ \ \ \ *\ return\ full\ vector}}
\DoxyCodeLine{00140\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00141\ \ \ \ \ \textcolor{keywordflow}{return}\ vecOut;}
\DoxyCodeLine{00142\ \}}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \textcolor{preprocessor}{\#define\ mve\_cmplx\_sum\_intra\_r\_i\_f16(vec,\ Re,\ Im)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00146\ \textcolor{preprocessor}{\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00147\ \textcolor{preprocessor}{\ \ \ \ float16x8\_t\ \ \ vecOut\ =\ \_\_mve\_cmplx\_sum\_intra\_vec\_f16(vec);\ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00148\ \textcolor{preprocessor}{\ \ \ \ Re\ =\ vgetq\_lane(vecOut,\ 4);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00149\ \textcolor{preprocessor}{\ \ \ \ Im\ =\ vgetq\_lane(vecOut,\ 5);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00150\ \textcolor{preprocessor}{\}}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \_\_STATIC\_FORCEINLINE\ \textcolor{keywordtype}{void}\ mve\_cmplx\_sum\_intra\_vec\_f16(}
\DoxyCodeLine{00153\ \ \ \ \ float16x8\_t\ \ \ vecIn,}
\DoxyCodeLine{00154\ \ \ \ \ float16\_t\ \ *pOut)}
\DoxyCodeLine{00155\ \{}
\DoxyCodeLine{00156\ \ \ \ \ float16x8\_t\ \ \ vecOut\ =\ \_\_mve\_cmplx\_sum\_intra\_vec\_f16(vecIn);}
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00158\ \textcolor{comment}{\ \ \ \ \ *\ Cmplx\ sum\ is\ in\ 4rd\ \&\ 5th\ f16\ elt}}
\DoxyCodeLine{00159\ \textcolor{comment}{\ \ \ \ \ *\ use\ 32-\/bit\ extraction}}
\DoxyCodeLine{00160\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00161\ \ \ \ \ *(float32\_t\ *)\ pOut\ =\ ((float32x4\_t)\ vecOut)[2];}
\DoxyCodeLine{00162\ \}}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00164\ }
\DoxyCodeLine{00165\ \textcolor{preprocessor}{\#define\ INVSQRT\_MAGIC\_F16\ \ \ \ \ \ \ \ \ \ \ 0x59ba\ \ \ \ \ \ }\textcolor{comment}{/*\ \ (\ 0x1ba\ =\ 0x3759df\ >>\ 13)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00166\ }
\DoxyCodeLine{00167\ \textcolor{comment}{/*\ canonical\ version\ of\ INVSQRT\_NEWTON\_MVE\_F16\ leads\ to\ bad\ performance\ */}}
\DoxyCodeLine{00168\ \textcolor{preprocessor}{\#define\ INVSQRT\_NEWTON\_MVE\_F16(invSqrt,\ xHalf,\ xStart)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00169\ \textcolor{preprocessor}{\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00170\ \textcolor{preprocessor}{\ \ \ \ float16x8\_t\ tmp;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00171\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00172\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ tmp\ =\ xhalf\ *\ x\ *\ x\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00173\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vmulq(xStart,\ xStart);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00174\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vmulq(tmp,\ xHalf);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00175\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ (1.5f\ -\/\ xhalf\ *\ x\ *\ x)\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00176\ \textcolor{preprocessor}{\ \ \ \ tmp\ =\ vsubq(vdupq\_n\_f16((float16\_t)1.5),\ tmp);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00177\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ x\ =\ x*(1.5f-\/xhalf*x*x);\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00178\ \textcolor{preprocessor}{\ \ \ \ invSqrt\ =\ vmulq(tmp,\ xStart);\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00179\ \textcolor{preprocessor}{\}}}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00182\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{00183\ }
\DoxyCodeLine{00184\ \textcolor{comment}{/***************************************}}
\DoxyCodeLine{00185\ \textcolor{comment}{}}
\DoxyCodeLine{00186\ \textcolor{comment}{Definitions\ available\ for\ MVEI\ and\ MVEF\ only}}
\DoxyCodeLine{00187\ \textcolor{comment}{}}
\DoxyCodeLine{00188\ \textcolor{comment}{***************************************/}}
\DoxyCodeLine{00189\ \textcolor{preprocessor}{\#if\ (defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEF)\ ||\ defined(ARM\_MATH\_MVEI))\ \ \&\&\ !defined(ARM\_MATH\_AUTOVECTORIZE)}}
\DoxyCodeLine{00190\ \textcolor{comment}{/*\ Following\ functions\ are\ used\ to\ transpose\ matrix\ in\ f32\ and\ q31\ cases\ */}}
\DoxyCodeLine{00191\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_32bit\_2x2\_mve(}
\DoxyCodeLine{00192\ \ \ \ \ uint32\_t\ *\ pDataSrc,}
\DoxyCodeLine{00193\ \ \ \ \ uint32\_t\ *\ pDataDest)}
\DoxyCodeLine{00194\ \{}
\DoxyCodeLine{00195\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ uint32x4\_t\ vecOffs\ =\ \{\ 0,\ 2,\ 1,\ 3\ \};}
\DoxyCodeLine{00196\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00197\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00198\ \textcolor{comment}{\ \ \ \ \ *\ |\ 0\ \ \ 1\ |\ \ \ =>\ \ |\ \ 0\ \ \ 2\ |}}
\DoxyCodeLine{00199\ \textcolor{comment}{\ \ \ \ \ *\ |\ 2\ \ \ 3\ |\ \ \ \ \ \ \ |\ \ 1\ \ \ 3\ |}}
\DoxyCodeLine{00200\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00201\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00202\ \ \ \ \ uint32x4\_t\ vecIn\ =\ vldrwq\_u32((uint32\_t\ \textcolor{keyword}{const}\ *)pDataSrc);}
\DoxyCodeLine{00203\ \ \ \ \ vstrwq\_scatter\_shifted\_offset\_u32(pDataDest,\ vecOffs,\ vecIn);}
\DoxyCodeLine{00204\ }
\DoxyCodeLine{00205\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00206\ \}}
\DoxyCodeLine{00207\ }
\DoxyCodeLine{00208\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_32bit\_3x3\_mve(}
\DoxyCodeLine{00209\ \ \ \ \ uint32\_t\ *\ pDataSrc,}
\DoxyCodeLine{00210\ \ \ \ \ uint32\_t\ *\ pDataDest)}
\DoxyCodeLine{00211\ \{}
\DoxyCodeLine{00212\ \ \ \ \ \textcolor{keyword}{const}\ uint32x4\_t\ vecOffs1\ =\ \{\ 0,\ 3,\ 6,\ 1\};}
\DoxyCodeLine{00213\ \ \ \ \ \textcolor{keyword}{const}\ uint32x4\_t\ vecOffs2\ =\ \{\ 4,\ 7,\ 2,\ 5\};}
\DoxyCodeLine{00214\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00215\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00216\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 0\ \ \ 1\ \ \ 2\ |\ \ \ \ \ \ \ |\ 0\ \ \ 3\ \ \ 6\ |\ \ 4\ x\ 32\ flattened\ version\ |\ 0\ \ \ 3\ \ \ 6\ \ \ 1\ |}}
\DoxyCodeLine{00217\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 3\ \ \ 4\ \ \ 5\ |\ \ \ =>\ \ |\ 1\ \ \ 4\ \ \ 7\ |\ \ \ \ \ \ \ \ \ \ \ \ =>\ \ \ \ \ \ \ \ \ \ \ \ \ |\ 4\ \ \ 7\ \ \ 2\ \ \ 5\ |}}
\DoxyCodeLine{00218\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 6\ \ \ 7\ \ \ 8\ |\ \ \ \ \ \ \ |\ 2\ \ \ 5\ \ \ 8\ |\ \ \ \ \ \ \ (row\ major)\ \ \ \ \ \ \ \ \ |\ 8\ \ \ .\ \ \ .\ \ \ .\ |}}
\DoxyCodeLine{00219\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00220\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00221\ \ \ \ \ uint32x4\_t\ vecIn1\ =\ vldrwq\_u32((uint32\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc);}
\DoxyCodeLine{00222\ \ \ \ \ uint32x4\_t\ vecIn2\ =\ vldrwq\_u32((uint32\_t\ \textcolor{keyword}{const}\ *)\ \&pDataSrc[4]);}
\DoxyCodeLine{00223\ }
\DoxyCodeLine{00224\ \ \ \ \ vstrwq\_scatter\_shifted\_offset\_u32(pDataDest,\ vecOffs1,\ vecIn1);}
\DoxyCodeLine{00225\ \ \ \ \ vstrwq\_scatter\_shifted\_offset\_u32(pDataDest,\ vecOffs2,\ vecIn2);}
\DoxyCodeLine{00226\ }
\DoxyCodeLine{00227\ \ \ \ \ pDataDest[8]\ =\ pDataSrc[8];}
\DoxyCodeLine{00228\ }
\DoxyCodeLine{00229\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00230\ \}}
\DoxyCodeLine{00231\ }
\DoxyCodeLine{00232\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_32bit\_4x4\_mve(uint32\_t\ *\ pDataSrc,\ uint32\_t\ *\ pDataDest)}
\DoxyCodeLine{00233\ \{}
\DoxyCodeLine{00234\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00235\ \textcolor{comment}{\ \ \ \ \ *\ 4x4\ Matrix\ transposition}}
\DoxyCodeLine{00236\ \textcolor{comment}{\ \ \ \ \ *\ is\ 4\ x\ de-\/interleave\ operation}}
\DoxyCodeLine{00237\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00238\ \textcolor{comment}{\ \ \ \ \ *\ 0\ \ \ 1\ \ \ 2\ \ \ 3\ \ \ \ \ \ \ 0\ \ \ 4\ \ \ 8\ \ \ 12}}
\DoxyCodeLine{00239\ \textcolor{comment}{\ \ \ \ \ *\ 4\ \ \ 5\ \ \ 6\ \ \ 7\ \ \ \ \ \ \ 1\ \ \ 5\ \ \ 9\ \ \ 13}}
\DoxyCodeLine{00240\ \textcolor{comment}{\ \ \ \ \ *\ 8\ \ \ 9\ \ \ 10\ \ 11\ \ \ \ \ \ 2\ \ \ 6\ \ \ 10\ \ 14}}
\DoxyCodeLine{00241\ \textcolor{comment}{\ \ \ \ \ *\ 12\ \ 13\ \ 14\ \ 15\ \ \ \ \ \ 3\ \ \ 7\ \ \ 11\ \ 15}}
\DoxyCodeLine{00242\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00243\ }
\DoxyCodeLine{00244\ \ \ \ \ uint32x4x4\_t\ vecIn;}
\DoxyCodeLine{00245\ }
\DoxyCodeLine{00246\ \ \ \ \ vecIn\ =\ vld4q((uint32\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc);}
\DoxyCodeLine{00247\ \ \ \ \ vstrwq(pDataDest,\ vecIn.val[0]);}
\DoxyCodeLine{00248\ \ \ \ \ pDataDest\ +=\ 4;}
\DoxyCodeLine{00249\ \ \ \ \ vstrwq(pDataDest,\ vecIn.val[1]);}
\DoxyCodeLine{00250\ \ \ \ \ pDataDest\ +=\ 4;}
\DoxyCodeLine{00251\ \ \ \ \ vstrwq(pDataDest,\ vecIn.val[2]);}
\DoxyCodeLine{00252\ \ \ \ \ pDataDest\ +=\ 4;}
\DoxyCodeLine{00253\ \ \ \ \ vstrwq(pDataDest,\ vecIn.val[3]);}
\DoxyCodeLine{00254\ }
\DoxyCodeLine{00255\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00256\ \}}
\DoxyCodeLine{00257\ }
\DoxyCodeLine{00258\ }
\DoxyCodeLine{00259\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_32bit\_generic\_mve(}
\DoxyCodeLine{00260\ \ \ \ \ uint16\_t\ \ \ \ srcRows,}
\DoxyCodeLine{00261\ \ \ \ \ uint16\_t\ \ \ \ srcCols,}
\DoxyCodeLine{00262\ \ \ \ \ uint32\_t\ \ *\ pDataSrc,}
\DoxyCodeLine{00263\ \ \ \ \ uint32\_t\ \ *\ pDataDest)}
\DoxyCodeLine{00264\ \{}
\DoxyCodeLine{00265\ \ \ \ \ uint32x4\_t\ vecOffs;}
\DoxyCodeLine{00266\ \ \ \ \ uint32\_t\ \ i;}
\DoxyCodeLine{00267\ \ \ \ \ uint32\_t\ \ blkCnt;}
\DoxyCodeLine{00268\ \ \ \ \ uint32\_t\ \textcolor{keyword}{const}\ *pDataC;}
\DoxyCodeLine{00269\ \ \ \ \ uint32\_t\ *pDataDestR;}
\DoxyCodeLine{00270\ \ \ \ \ uint32x4\_t\ vecIn;}
\DoxyCodeLine{00271\ }
\DoxyCodeLine{00272\ \ \ \ \ vecOffs\ =\ vidupq\_u32((uint32\_t)0,\ 1);}
\DoxyCodeLine{00273\ \ \ \ \ vecOffs\ =\ vecOffs\ *\ srcCols;}
\DoxyCodeLine{00274\ }
\DoxyCodeLine{00275\ \ \ \ \ i\ =\ srcCols;}
\DoxyCodeLine{00276\ \ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00277\ \ \ \ \ \{}
\DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ pDataC\ =\ (uint32\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc;}
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ pDataDestR\ =\ pDataDest;}
\DoxyCodeLine{00280\ }
\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ blkCnt\ =\ srcRows\ >>\ 2;}
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrwq\_gather\_shifted\_offset\_u32(pDataC,\ vecOffs);}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ vstrwq(pDataDestR,\ vecIn);\ }
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ pDataDestR\ +=\ 4;}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \ \ \ \ pDataC\ =\ pDataC\ +\ srcCols\ *\ 4;}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00289\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ Decrement\ the\ blockSize\ loop\ counter}}
\DoxyCodeLine{00290\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \ \ \ \ blkCnt-\/-\/;}
\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00293\ }
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00295\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ tail}}
\DoxyCodeLine{00296\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ blkCnt\ =\ srcRows\ \&\ 3;}
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00299\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \ \ \ \ mve\_pred16\_t\ p0\ =\ vctp32q(blkCnt);}
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrwq\_gather\_shifted\_offset\_u32(pDataC,\ vecOffs);}
\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \ \ \ \ vstrwq\_p(pDataDestR,\ vecIn,\ p0);}
\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00304\ }
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ pDataSrc\ +=\ 1;}
\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ pDataDest\ +=\ srcRows;}
\DoxyCodeLine{00307\ \ \ \ \ \}}
\DoxyCodeLine{00308\ \ \ \ \ \textcolor{keywordflow}{while}\ (-\/-\/i);}
\DoxyCodeLine{00309\ }
\DoxyCodeLine{00310\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00311\ \}}
\DoxyCodeLine{00312\ }
\DoxyCodeLine{00313\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_cmplx\_trans\_32bit(}
\DoxyCodeLine{00314\ \ \ \ \ uint16\_t\ \ \ \ srcRows,}
\DoxyCodeLine{00315\ \ \ \ \ uint16\_t\ \ \ \ srcCols,}
\DoxyCodeLine{00316\ \ \ \ \ uint32\_t\ \ \ *pDataSrc,}
\DoxyCodeLine{00317\ \ \ \ \ uint16\_t\ \ \ \ dstRows,}
\DoxyCodeLine{00318\ \ \ \ \ uint16\_t\ \ \ \ dstCols,}
\DoxyCodeLine{00319\ \ \ \ \ uint32\_t\ \ \ *pDataDest)}
\DoxyCodeLine{00320\ \{}
\DoxyCodeLine{00321\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ \ i;}
\DoxyCodeLine{00322\ \ \ \ \ uint32\_t\ \textcolor{keyword}{const}\ *pDataC;}
\DoxyCodeLine{00323\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ *pDataRow;}
\DoxyCodeLine{00324\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ *pDataDestR,\ *pDataDestRow;}
\DoxyCodeLine{00325\ \ \ \ \ uint32x4\_t\ \ \ \ \ \ vecOffsRef,\ vecOffsCur;}
\DoxyCodeLine{00326\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ \ blkCnt;}
\DoxyCodeLine{00327\ \ \ \ \ uint32x4\_t\ \ \ \ \ \ vecIn;}
\DoxyCodeLine{00328\ }
\DoxyCodeLine{00329\ \textcolor{preprocessor}{\#ifdef\ ARM\_MATH\_MATRIX\_CHECK}}
\DoxyCodeLine{00330\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00331\ \textcolor{comment}{\ \ \ \ \ *\ Check\ for\ matrix\ mismatch\ condition}}
\DoxyCodeLine{00332\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00333\ \ \ \ \ \textcolor{keywordflow}{if}\ ((srcRows\ !=\ dstCols)\ ||\ (srcCols\ !=\ dstRows))}
\DoxyCodeLine{00334\ \ \ \ \ \{}
\DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00336\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ Set\ status\ as\ ARM\_MATH\_SIZE\_MISMATCH}}
\DoxyCodeLine{00337\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ARM\_MATH\_SIZE\_MISMATCH;}
\DoxyCodeLine{00339\ \ \ \ \ \}}
\DoxyCodeLine{00340\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00341\ \ \ \ \ (void)dstRows;}
\DoxyCodeLine{00342\ \ \ \ \ (void)dstCols;}
\DoxyCodeLine{00343\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00344\ }
\DoxyCodeLine{00345\ \ \ \ \ \textcolor{comment}{/*\ 2x2,\ 3x3\ and\ 4x4\ specialization\ to\ be\ added\ */}}
\DoxyCodeLine{00346\ }
\DoxyCodeLine{00347\ \ \ \ \ vecOffsRef[0]\ =\ 0;}
\DoxyCodeLine{00348\ \ \ \ \ vecOffsRef[1]\ =\ 1;}
\DoxyCodeLine{00349\ \ \ \ \ vecOffsRef[2]\ =\ srcCols\ <<\ 1;}
\DoxyCodeLine{00350\ \ \ \ \ vecOffsRef[3]\ =\ (srcCols\ <<\ 1)\ +\ 1;}
\DoxyCodeLine{00351\ }
\DoxyCodeLine{00352\ \ \ \ \ pDataRow\ =\ pDataSrc;}
\DoxyCodeLine{00353\ \ \ \ \ pDataDestRow\ =\ pDataDest;}
\DoxyCodeLine{00354\ \ \ \ \ i\ =\ srcCols;}
\DoxyCodeLine{00355\ \ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00356\ \ \ \ \ \{}
\DoxyCodeLine{00357\ \ \ \ \ \ \ \ \ pDataC\ =\ (uint32\_t\ \textcolor{keyword}{const}\ *)\ pDataRow;}
\DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ pDataDestR\ =\ pDataDestRow;}
\DoxyCodeLine{00359\ \ \ \ \ \ \ \ \ vecOffsCur\ =\ vecOffsRef;}
\DoxyCodeLine{00360\ }
\DoxyCodeLine{00361\ \ \ \ \ \ \ \ \ blkCnt\ =\ (srcRows\ *\ CMPLX\_DIM)\ >>\ 2;}
\DoxyCodeLine{00362\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00363\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00364\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrwq\_gather\_shifted\_offset(pDataC,\ vecOffsCur);}
\DoxyCodeLine{00365\ \ \ \ \ \ \ \ \ \ \ \ \ vstrwq(pDataDestR,\ vecIn);\ }
\DoxyCodeLine{00366\ \ \ \ \ \ \ \ \ \ \ \ \ pDataDestR\ +=\ 4;}
\DoxyCodeLine{00367\ \ \ \ \ \ \ \ \ \ \ \ \ vecOffsCur\ =\ vaddq(vecOffsCur,\ (srcCols\ <<\ 2));}
\DoxyCodeLine{00368\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00369\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ Decrement\ the\ blockSize\ loop\ counter}}
\DoxyCodeLine{00370\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00371\ \ \ \ \ \ \ \ \ \ \ \ \ \ blkCnt-\/-\/;}
\DoxyCodeLine{00372\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00373\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00374\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ tail}}
\DoxyCodeLine{00375\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ (will\ be\ merged\ thru\ tail\ predication)}}
\DoxyCodeLine{00376\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00377\ \ \ \ \ \ \ \ \ blkCnt\ =\ (srcRows\ *\ CMPLX\_DIM)\ \&\ 3;}
\DoxyCodeLine{00378\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00379\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ \ \ \ \ mve\_pred16\_t\ p0\ =\ vctp32q(blkCnt);}
\DoxyCodeLine{00381\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrwq\_gather\_shifted\_offset(pDataC,\ vecOffsCur);}
\DoxyCodeLine{00382\ \ \ \ \ \ \ \ \ \ \ \ \ vstrwq\_p(pDataDestR,\ vecIn,\ p0);}
\DoxyCodeLine{00383\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00384\ }
\DoxyCodeLine{00385\ \ \ \ \ \ \ \ \ pDataRow\ +=\ CMPLX\_DIM;}
\DoxyCodeLine{00386\ \ \ \ \ \ \ \ \ pDataDestRow\ +=\ (srcRows\ *\ CMPLX\_DIM);}
\DoxyCodeLine{00387\ \ \ \ \ \}}
\DoxyCodeLine{00388\ \ \ \ \ \textcolor{keywordflow}{while}\ (-\/-\/i);}
\DoxyCodeLine{00389\ }
\DoxyCodeLine{00390\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00391\ \}}
\DoxyCodeLine{00392\ }
\DoxyCodeLine{00393\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_16bit\_2x2(uint16\_t\ *\ pDataSrc,\ uint16\_t\ *\ pDataDest)}
\DoxyCodeLine{00394\ \{}
\DoxyCodeLine{00395\ \ \ \ \ pDataDest[0]\ =\ pDataSrc[0];}
\DoxyCodeLine{00396\ \ \ \ \ pDataDest[3]\ =\ pDataSrc[3];}
\DoxyCodeLine{00397\ \ \ \ \ pDataDest[2]\ =\ pDataSrc[1];}
\DoxyCodeLine{00398\ \ \ \ \ pDataDest[1]\ =\ pDataSrc[2];}
\DoxyCodeLine{00399\ }
\DoxyCodeLine{00400\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00401\ \}}
\DoxyCodeLine{00402\ }
\DoxyCodeLine{00403\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_16bit\_3x3\_mve(uint16\_t\ *\ pDataSrc,\ uint16\_t\ *\ pDataDest)}
\DoxyCodeLine{00404\ \{}
\DoxyCodeLine{00405\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ uint16\_t\ stridesTr33[8]\ =\ \{\ 0,\ 3,\ 6,\ 1,\ 4,\ 7,\ 2,\ 5\ \};}
\DoxyCodeLine{00406\ \ \ \ \ uint16x8\_t\ \ \ \ vecOffs1;}
\DoxyCodeLine{00407\ \ \ \ \ uint16x8\_t\ \ \ \ vecIn1;}
\DoxyCodeLine{00408\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00409\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00410\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 0\ \ \ 1\ \ \ 2\ |\ \ \ \ \ \ \ |\ 0\ \ \ 3\ \ \ 6\ |\ \ 8\ x\ 16\ flattened\ version\ |\ 0\ \ \ 3\ \ \ 6\ \ \ 1\ \ \ 4\ \ \ 7\ \ \ 2\ \ \ 5\ |}}
\DoxyCodeLine{00411\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 3\ \ \ 4\ \ \ 5\ |\ =>\ \ \ \ |\ 1\ \ \ 4\ \ \ 7\ |\ \ \ \ \ \ \ \ \ \ \ \ =>\ \ \ \ \ \ \ \ \ \ \ \ \ |\ 8\ \ \ .\ \ \ .\ \ \ .\ \ \ .\ \ \ .\ \ \ .\ \ \ .\ |}}
\DoxyCodeLine{00412\ \textcolor{comment}{\ \ \ \ \ *\ \ |\ 6\ \ \ 7\ \ \ 8\ |\ \ \ \ \ \ \ |\ 2\ \ \ 5\ \ \ 8\ |\ \ \ \ \ \ \ (row\ major)}}
\DoxyCodeLine{00413\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00414\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00415\ \ \ \ \ vecOffs1\ =\ vldrhq\_u16((uint16\_t\ \textcolor{keyword}{const}\ *)\ stridesTr33);}
\DoxyCodeLine{00416\ \ \ \ \ vecIn1\ =\ vldrhq\_u16((uint16\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc);}
\DoxyCodeLine{00417\ }
\DoxyCodeLine{00418\ \ \ \ \ vstrhq\_scatter\_shifted\_offset\_u16(pDataDest,\ vecOffs1,\ vecIn1);}
\DoxyCodeLine{00419\ }
\DoxyCodeLine{00420\ \ \ \ \ pDataDest[8]\ =\ pDataSrc[8];}
\DoxyCodeLine{00421\ }
\DoxyCodeLine{00422\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00423\ \}}
\DoxyCodeLine{00424\ }
\DoxyCodeLine{00425\ }
\DoxyCodeLine{00426\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_16bit\_4x4\_mve(uint16\_t\ *\ pDataSrc,\ uint16\_t\ *\ pDataDest)}
\DoxyCodeLine{00427\ \{}
\DoxyCodeLine{00428\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ uint16\_t\ stridesTr44\_1[8]\ =\ \{\ 0,\ 4,\ 8,\ 12,\ 1,\ 5,\ 9,\ 13\ \};}
\DoxyCodeLine{00429\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ uint16\_t\ stridesTr44\_2[8]\ =\ \{\ 2,\ 6,\ 10,\ 14,\ 3,\ 7,\ 11,\ 15\ \};}
\DoxyCodeLine{00430\ \ \ \ \ uint16x8\_t\ \ \ \ vecOffs1,\ vecOffs2;}
\DoxyCodeLine{00431\ \ \ \ \ uint16x8\_t\ \ \ \ vecIn1,\ vecIn2;}
\DoxyCodeLine{00432\ \ \ \ \ uint16\_t\ \textcolor{keyword}{const}\ *\ pDataSrcVec\ =\ (uint16\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc;}
\DoxyCodeLine{00433\ }
\DoxyCodeLine{00434\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00435\ \textcolor{comment}{\ \ \ \ \ *\ 4x4\ Matrix\ transposition}}
\DoxyCodeLine{00436\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00437\ \textcolor{comment}{\ \ \ \ \ *\ |\ 0\ \ \ 1\ \ \ 2\ \ \ 3\ \ |\ \ \ \ \ \ \ |\ 0\ \ \ 4\ \ \ 8\ \ \ 12\ |\ \ \ 8\ x\ 16\ flattened\ version}}
\DoxyCodeLine{00438\ \textcolor{comment}{\ \ \ \ \ *\ |\ 4\ \ \ 5\ \ \ 6\ \ \ 7\ \ |\ \ =>\ \ \ |\ 1\ \ \ 5\ \ \ 9\ \ \ 13\ |\ \ \ =>\ \ \ \ \ \ [0\ \ \ 4\ \ \ 8\ \ \ 12\ \ 1\ \ \ 5\ \ \ 9\ \ \ 13]}}
\DoxyCodeLine{00439\ \textcolor{comment}{\ \ \ \ \ *\ |\ 8\ \ \ 9\ \ \ 10\ \ 11\ |\ \ \ \ \ \ \ |\ 2\ \ \ 6\ \ \ 10\ \ 14\ |\ \ \ \ \ \ \ \ \ \ \ [2\ \ \ 6\ \ \ 10\ \ 14\ \ 3\ \ \ 7\ \ \ 11\ \ 15]}}
\DoxyCodeLine{00440\ \textcolor{comment}{\ \ \ \ \ *\ |\ 12\ \ 13\ \ 14\ \ 15\ |\ \ \ \ \ \ \ |\ 3\ \ \ 7\ \ \ 11\ \ 15\ |}}
\DoxyCodeLine{00441\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00442\ }
\DoxyCodeLine{00443\ \ \ \ \ vecOffs1\ =\ vldrhq\_u16((uint16\_t\ \textcolor{keyword}{const}\ *)\ stridesTr44\_1);}
\DoxyCodeLine{00444\ \ \ \ \ vecOffs2\ =\ vldrhq\_u16((uint16\_t\ \textcolor{keyword}{const}\ *)\ stridesTr44\_2);}
\DoxyCodeLine{00445\ \ \ \ \ vecIn1\ =\ vldrhq\_u16(pDataSrcVec);}
\DoxyCodeLine{00446\ \ \ \ \ pDataSrcVec\ +=\ 8;}
\DoxyCodeLine{00447\ \ \ \ \ vecIn2\ =\ vldrhq\_u16(pDataSrcVec);}
\DoxyCodeLine{00448\ }
\DoxyCodeLine{00449\ \ \ \ \ vstrhq\_scatter\_shifted\_offset\_u16(pDataDest,\ vecOffs1,\ vecIn1);}
\DoxyCodeLine{00450\ \ \ \ \ vstrhq\_scatter\_shifted\_offset\_u16(pDataDest,\ vecOffs2,\ vecIn2);}
\DoxyCodeLine{00451\ }
\DoxyCodeLine{00452\ }
\DoxyCodeLine{00453\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00454\ \}}
\DoxyCodeLine{00455\ }
\DoxyCodeLine{00456\ }
\DoxyCodeLine{00457\ }
\DoxyCodeLine{00458\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_trans\_16bit\_generic(}
\DoxyCodeLine{00459\ \ \ \ \ uint16\_t\ \ \ \ srcRows,}
\DoxyCodeLine{00460\ \ \ \ \ uint16\_t\ \ \ \ srcCols,}
\DoxyCodeLine{00461\ \ \ \ \ uint16\_t\ \ *\ pDataSrc,}
\DoxyCodeLine{00462\ \ \ \ \ uint16\_t\ \ *\ pDataDest)}
\DoxyCodeLine{00463\ \{}
\DoxyCodeLine{00464\ \ \ \ \ uint16x8\_t\ \ \ \ vecOffs;}
\DoxyCodeLine{00465\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ \ i;}
\DoxyCodeLine{00466\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ \ blkCnt;}
\DoxyCodeLine{00467\ \ \ \ \ uint16\_t\ \textcolor{keyword}{const}\ *pDataC;}
\DoxyCodeLine{00468\ \ \ \ \ uint16\_t\ \ \ \ \ \ \ *pDataDestR;}
\DoxyCodeLine{00469\ \ \ \ \ uint16x8\_t\ \ \ \ vecIn;}
\DoxyCodeLine{00470\ }
\DoxyCodeLine{00471\ \ \ \ \ vecOffs\ =\ vidupq\_u16((uint32\_t)0,\ 1);}
\DoxyCodeLine{00472\ \ \ \ \ vecOffs\ =\ vecOffs\ *\ srcCols;}
\DoxyCodeLine{00473\ }
\DoxyCodeLine{00474\ \ \ \ \ i\ =\ srcCols;}
\DoxyCodeLine{00475\ \ \ \ \ \textcolor{keywordflow}{while}(i\ >\ 0U)}
\DoxyCodeLine{00476\ \ \ \ \ \{}
\DoxyCodeLine{00477\ \ \ \ \ \ \ \ \ pDataC\ =\ (uint16\_t\ \textcolor{keyword}{const}\ *)\ pDataSrc;}
\DoxyCodeLine{00478\ \ \ \ \ \ \ \ \ pDataDestR\ =\ pDataDest;}
\DoxyCodeLine{00479\ }
\DoxyCodeLine{00480\ \ \ \ \ \ \ \ \ blkCnt\ =\ srcRows\ >>\ 3;}
\DoxyCodeLine{00481\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00482\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00483\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrhq\_gather\_shifted\_offset\_u16(pDataC,\ vecOffs);}
\DoxyCodeLine{00484\ \ \ \ \ \ \ \ \ \ \ \ \ vstrhq\_u16(pDataDestR,\ vecIn);\ }
\DoxyCodeLine{00485\ \ \ \ \ \ \ \ \ \ \ \ \ pDataDestR\ +=\ 8;}
\DoxyCodeLine{00486\ \ \ \ \ \ \ \ \ \ \ \ \ pDataC\ =\ pDataC\ +\ srcCols\ *\ 8;}
\DoxyCodeLine{00487\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00488\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ Decrement\ the\ blockSize\ loop\ counter}}
\DoxyCodeLine{00489\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00490\ \ \ \ \ \ \ \ \ \ \ \ \ blkCnt-\/-\/;}
\DoxyCodeLine{00491\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00492\ }
\DoxyCodeLine{00493\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00494\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ tail}}
\DoxyCodeLine{00495\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00496\ \ \ \ \ \ \ \ \ blkCnt\ =\ srcRows\ \&\ 7;}
\DoxyCodeLine{00497\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00498\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00499\ \ \ \ \ \ \ \ \ \ \ \ \ mve\_pred16\_t\ p0\ =\ vctp16q(blkCnt);}
\DoxyCodeLine{00500\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrhq\_gather\_shifted\_offset\_u16(pDataC,\ vecOffs);}
\DoxyCodeLine{00501\ \ \ \ \ \ \ \ \ \ \ \ \ vstrhq\_p\_u16(pDataDestR,\ vecIn,\ p0);}
\DoxyCodeLine{00502\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00503\ \ \ \ \ \ \ \ \ pDataSrc\ +=\ 1;}
\DoxyCodeLine{00504\ \ \ \ \ \ \ \ \ pDataDest\ +=\ srcRows;}
\DoxyCodeLine{00505\ \ \ \ \ \ \ \ \ i-\/-\/;}
\DoxyCodeLine{00506\ \ \ \ \ \}}
\DoxyCodeLine{00507\ }
\DoxyCodeLine{00508\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00509\ \}}
\DoxyCodeLine{00510\ }
\DoxyCodeLine{00511\ }
\DoxyCodeLine{00512\ \_\_STATIC\_INLINE\ arm\_status\ arm\_mat\_cmplx\_trans\_16bit(}
\DoxyCodeLine{00513\ \ \ \ \ uint16\_t\ \ \ \ srcRows,}
\DoxyCodeLine{00514\ \ \ \ \ uint16\_t\ \ \ \ srcCols,}
\DoxyCodeLine{00515\ \ \ \ \ uint16\_t\ \ \ *pDataSrc,}
\DoxyCodeLine{00516\ \ \ \ \ uint16\_t\ \ \ \ dstRows,}
\DoxyCodeLine{00517\ \ \ \ \ uint16\_t\ \ \ \ dstCols,}
\DoxyCodeLine{00518\ \ \ \ \ uint16\_t\ \ \ *pDataDest)}
\DoxyCodeLine{00519\ \{}
\DoxyCodeLine{00520\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ uint16\_t\ loadCmplxCol[8]\ =\ \{\ 0,\ 0,\ 1,\ 1,\ 2,\ 2,\ 3,\ 3\ \};}
\DoxyCodeLine{00521\ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ \ \ i;}
\DoxyCodeLine{00522\ \ \ \ \ uint16x8\_t\ \ \ \ vecOffsRef,\ vecOffsCur;}
\DoxyCodeLine{00523\ \ \ \ \ uint16\_t\ \textcolor{keyword}{const}\ *pDataC;}
\DoxyCodeLine{00524\ \ \ \ \ uint16\_t\ \ \ \ \ \ \ *pDataRow;}
\DoxyCodeLine{00525\ \ \ \ \ uint16\_t\ \ \ \ \ \ \ *pDataDestR,\ *pDataDestRow;}
\DoxyCodeLine{00526\ \ \ \ \ uint32\_t\ \ \ \ \ \ \ \ blkCnt;}
\DoxyCodeLine{00527\ \ \ \ \ uint16x8\_t\ \ \ \ vecIn;}
\DoxyCodeLine{00528\ }
\DoxyCodeLine{00529\ \textcolor{preprocessor}{\#ifdef\ ARM\_MATH\_MATRIX\_CHECK}}
\DoxyCodeLine{00530\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00531\ \textcolor{comment}{\ \ \ \ \ *\ Check\ for\ matrix\ mismatch\ condition}}
\DoxyCodeLine{00532\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00533\ \ \ \ \ \textcolor{keywordflow}{if}\ ((srcRows\ !=\ dstCols)\ ||\ (srcCols\ !=\ dstRows))}
\DoxyCodeLine{00534\ \ \ \ \ \{}
\DoxyCodeLine{00535\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00536\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ Set\ status\ as\ ARM\_MATH\_SIZE\_MISMATCH}}
\DoxyCodeLine{00537\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00538\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ARM\_MATH\_SIZE\_MISMATCH;}
\DoxyCodeLine{00539\ \ \ \ \ \}}
\DoxyCodeLine{00540\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00541\ \ \ \ \ (void)dstRows;}
\DoxyCodeLine{00542\ \ \ \ \ (void)dstCols;}
\DoxyCodeLine{00543\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00544\ }
\DoxyCodeLine{00545\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00546\ \textcolor{comment}{\ \ \ \ \ *\ 2x2,\ 3x3\ and\ 4x4\ specialization\ to\ be\ added}}
\DoxyCodeLine{00547\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00548\ }
\DoxyCodeLine{00549\ }
\DoxyCodeLine{00550\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00551\ \textcolor{comment}{\ \ \ \ \ *\ build\ \ [0,\ 1,\ 2xcol,\ 2xcol+1,\ 4xcol,\ 4xcol+1,\ 6xcol,\ 6xcol+1]}}
\DoxyCodeLine{00552\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00553\ \ \ \ \ vecOffsRef\ =\ vldrhq\_u16((uint16\_t\ \textcolor{keyword}{const}\ *)\ loadCmplxCol);}
\DoxyCodeLine{00554\ \ \ \ \ vecOffsRef\ =\ vmulq(vecOffsRef,\ (uint16\_t)\ (srcCols\ *\ CMPLX\_DIM))}
\DoxyCodeLine{00555\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\ viwdupq\_u16((uint32\_t)0,\ (uint16\_t)\ 2,\ 1);}
\DoxyCodeLine{00556\ }
\DoxyCodeLine{00557\ \ \ \ \ pDataRow\ =\ pDataSrc;}
\DoxyCodeLine{00558\ \ \ \ \ pDataDestRow\ =\ pDataDest;}
\DoxyCodeLine{00559\ \ \ \ \ i\ =\ srcCols;}
\DoxyCodeLine{00560\ \ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00561\ \ \ \ \ \{}
\DoxyCodeLine{00562\ \ \ \ \ \ \ \ \ pDataC\ =\ (uint16\_t\ \textcolor{keyword}{const}\ *)\ pDataRow;}
\DoxyCodeLine{00563\ \ \ \ \ \ \ \ \ pDataDestR\ =\ pDataDestRow;}
\DoxyCodeLine{00564\ \ \ \ \ \ \ \ \ vecOffsCur\ =\ vecOffsRef;}
\DoxyCodeLine{00565\ }
\DoxyCodeLine{00566\ \ \ \ \ \ \ \ \ blkCnt\ =\ (srcRows\ *\ CMPLX\_DIM)\ >>\ 3;}
\DoxyCodeLine{00567\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00568\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00569\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrhq\_gather\_shifted\_offset(pDataC,\ vecOffsCur);}
\DoxyCodeLine{00570\ \ \ \ \ \ \ \ \ \ \ \ \ vstrhq(pDataDestR,\ vecIn);\ \ }
\DoxyCodeLine{00571\ \ \ \ \ \ \ \ \ \ \ \ \ pDataDestR+=\ 8;\ \textcolor{comment}{//\ VEC\_LANES\_U16}}
\DoxyCodeLine{00572\ \ \ \ \ \ \ \ \ \ \ \ \ vecOffsCur\ =\ vaddq(vecOffsCur,\ (srcCols\ <<\ 3));}
\DoxyCodeLine{00573\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00574\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ Decrement\ the\ blockSize\ loop\ counter}}
\DoxyCodeLine{00575\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00576\ \ \ \ \ \ \ \ \ \ \ \ \ blkCnt-\/-\/;}
\DoxyCodeLine{00577\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00578\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00579\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ tail}}
\DoxyCodeLine{00580\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ (will\ be\ merged\ thru\ tail\ predication)}}
\DoxyCodeLine{00581\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ */}}
\DoxyCodeLine{00582\ \ \ \ \ \ \ \ \ blkCnt\ =\ (srcRows\ *\ CMPLX\_DIM)\ \&\ 0x7;}
\DoxyCodeLine{00583\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (blkCnt\ >\ 0U)}
\DoxyCodeLine{00584\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00585\ \ \ \ \ \ \ \ \ \ \ \ \ mve\_pred16\_t\ p0\ =\ vctp16q(blkCnt);}
\DoxyCodeLine{00586\ \ \ \ \ \ \ \ \ \ \ \ \ vecIn\ =\ vldrhq\_gather\_shifted\_offset(pDataC,\ vecOffsCur);}
\DoxyCodeLine{00587\ \ \ \ \ \ \ \ \ \ \ \ \ vstrhq\_p(pDataDestR,\ vecIn,\ p0);}
\DoxyCodeLine{00588\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00589\ }
\DoxyCodeLine{00590\ \ \ \ \ \ \ \ \ pDataRow\ +=\ CMPLX\_DIM;}
\DoxyCodeLine{00591\ \ \ \ \ \ \ \ \ pDataDestRow\ +=\ (srcRows\ *\ CMPLX\_DIM);}
\DoxyCodeLine{00592\ \ \ \ \ \}}
\DoxyCodeLine{00593\ \ \ \ \ \textcolor{keywordflow}{while}\ (-\/-\/i);}
\DoxyCodeLine{00594\ }
\DoxyCodeLine{00595\ \ \ \ \ \textcolor{keywordflow}{return}\ (ARM\_MATH\_SUCCESS);}
\DoxyCodeLine{00596\ \}}
\DoxyCodeLine{00597\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ MVEF\ and\ MVEI\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00598\ }
\DoxyCodeLine{00599\ \textcolor{comment}{/***************************************}}
\DoxyCodeLine{00600\ \textcolor{comment}{}}
\DoxyCodeLine{00601\ \textcolor{comment}{Definitions\ available\ for\ MVEI\ only}}
\DoxyCodeLine{00602\ \textcolor{comment}{}}
\DoxyCodeLine{00603\ \textcolor{comment}{***************************************/}}
\DoxyCodeLine{00604\ \textcolor{preprocessor}{\#if\ (defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEI))\ \ \&\&\ !defined(ARM\_MATH\_AUTOVECTORIZE)}}
\DoxyCodeLine{00605\ }
\DoxyCodeLine{00606\ \textcolor{preprocessor}{\#include\ "{}arm\_common\_tables.h"{}}}
\DoxyCodeLine{00607\ }
\DoxyCodeLine{00608\ \textcolor{preprocessor}{\#define\ MVE\_ASRL\_SAT16(acc,\ shift)\ \ \ \ \ \ \ \ \ \ ((sqrshrl\_sat48(acc,\ -\/(32-\/shift))\ >>\ 32)\ \&\ 0xffffffff)}}
\DoxyCodeLine{00609\ \textcolor{preprocessor}{\#define\ MVE\_ASRL\_SAT32(acc,\ shift)\ \ \ \ \ \ \ \ \ \ ((sqrshrl(acc,\ -\/(32-\/shift))\ >>\ 32)\ \&\ 0xffffffff)}}
\DoxyCodeLine{00610\ }
\DoxyCodeLine{00611\ }
\DoxyCodeLine{00612\ \textcolor{preprocessor}{\#if\ !defined(ARM\_DSP\_CONFIG\_TABLES)\ ||\ defined(ARM\_ALL\_FAST\_TABLES)\ ||\ defined(ARM\_TABLE\_FAST\_SQRT\_Q31\_MVE)}}
\DoxyCodeLine{00613\ \_\_STATIC\_INLINE\ q31x4\_t\ FAST\_VSQRT\_Q31(q31x4\_t\ vecIn)}
\DoxyCodeLine{00614\ \{}
\DoxyCodeLine{00615\ \ \ \ \ q63x2\_t\ \ \ \ \ \ \ \ \ vecTmpLL;}
\DoxyCodeLine{00616\ \ \ \ \ q31x4\_t\ \ \ \ \ \ \ \ \ vecTmp0,\ vecTmp1;}
\DoxyCodeLine{00617\ \ \ \ \ q31\_t\ \ \ \ \ \ \ \ \ \ \ scale;}
\DoxyCodeLine{00618\ \ \ \ \ q63\_t\ \ \ \ \ \ \ \ \ \ \ tmp64;}
\DoxyCodeLine{00619\ \ \ \ \ q31x4\_t\ \ \ \ \ \ \ \ \ vecNrm,\ vecDst,\ vecIdx,\ vecSignBits;}
\DoxyCodeLine{00620\ }
\DoxyCodeLine{00621\ }
\DoxyCodeLine{00622\ \ \ \ \ vecSignBits\ =\ vclsq(vecIn);}
\DoxyCodeLine{00623\ \ \ \ \ vecSignBits\ =\ vbicq\_n\_s32(vecSignBits,\ 1);}
\DoxyCodeLine{00624\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00625\ \textcolor{comment}{\ \ \ \ \ *\ in\ =\ in\ <<\ no\_of\_sign\_bits;}}
\DoxyCodeLine{00626\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00627\ \ \ \ \ vecNrm\ =\ vshlq(vecIn,\ vecSignBits);}
\DoxyCodeLine{00628\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00629\ \textcolor{comment}{\ \ \ \ \ *\ index\ =\ in\ >>\ 24;}}
\DoxyCodeLine{00630\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00631\ \ \ \ \ vecIdx\ =\ vecNrm\ >>\ 24;}
\DoxyCodeLine{00632\ \ \ \ \ vecIdx\ =\ vecIdx\ <<\ 1;}
\DoxyCodeLine{00633\ }
\DoxyCodeLine{00634\ \ \ \ \ vecTmp0\ =\ vldrwq\_gather\_shifted\_offset\_s32(sqrtTable\_Q31,\ (uint32x4\_t)vecIdx);}
\DoxyCodeLine{00635\ }
\DoxyCodeLine{00636\ \ \ \ \ vecIdx\ =\ vecIdx\ +\ 1;}
\DoxyCodeLine{00637\ }
\DoxyCodeLine{00638\ \ \ \ \ vecTmp1\ =\ vldrwq\_gather\_shifted\_offset\_s32(sqrtTable\_Q31,\ (uint32x4\_t)vecIdx);}
\DoxyCodeLine{00639\ }
\DoxyCodeLine{00640\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecTmp1,\ vecNrm);}
\DoxyCodeLine{00641\ \ \ \ \ vecTmp0\ =\ vecTmp0\ -\/\ vecTmp1;}
\DoxyCodeLine{00642\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecTmp0,\ vecTmp0);}
\DoxyCodeLine{00643\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecNrm,\ vecTmp1);}
\DoxyCodeLine{00644\ \ \ \ \ vecTmp1\ =\ vdupq\_n\_s32(0x18000000)\ -\/\ vecTmp1;}
\DoxyCodeLine{00645\ \ \ \ \ vecTmp0\ =\ vqrdmulhq(vecTmp0,\ vecTmp1);}
\DoxyCodeLine{00646\ \ \ \ \ vecTmpLL\ =\ vmullbq\_int(vecNrm,\ vecTmp0);}
\DoxyCodeLine{00647\ }
\DoxyCodeLine{00648\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00649\ \textcolor{comment}{\ \ \ \ \ *\ scale\ elements\ 0,\ 2}}
\DoxyCodeLine{00650\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00651\ \ \ \ \ scale\ =\ 26\ +\ (vecSignBits[0]\ >>\ 1);}
\DoxyCodeLine{00652\ \ \ \ \ tmp64\ =\ asrl(vecTmpLL[0],\ scale);}
\DoxyCodeLine{00653\ \ \ \ \ vecDst[0]\ =\ (q31\_t)\ tmp64;}
\DoxyCodeLine{00654\ }
\DoxyCodeLine{00655\ \ \ \ \ scale\ =\ 26\ +\ (vecSignBits[2]\ >>\ 1);}
\DoxyCodeLine{00656\ \ \ \ \ tmp64\ =\ asrl(vecTmpLL[1],\ scale);}
\DoxyCodeLine{00657\ \ \ \ \ vecDst[2]\ =\ (q31\_t)\ tmp64;}
\DoxyCodeLine{00658\ }
\DoxyCodeLine{00659\ \ \ \ \ vecTmpLL\ =\ vmulltq\_int(vecNrm,\ vecTmp0);}
\DoxyCodeLine{00660\ }
\DoxyCodeLine{00661\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00662\ \textcolor{comment}{\ \ \ \ \ *\ scale\ elements\ 1,\ 3}}
\DoxyCodeLine{00663\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00664\ \ \ \ \ scale\ =\ 26\ +\ (vecSignBits[1]\ >>\ 1);}
\DoxyCodeLine{00665\ \ \ \ \ tmp64\ =\ asrl(vecTmpLL[0],\ scale);}
\DoxyCodeLine{00666\ \ \ \ \ vecDst[1]\ =\ (q31\_t)\ tmp64;}
\DoxyCodeLine{00667\ }
\DoxyCodeLine{00668\ \ \ \ \ scale\ =\ 26\ +\ (vecSignBits[3]\ >>\ 1);}
\DoxyCodeLine{00669\ \ \ \ \ tmp64\ =\ asrl(vecTmpLL[1],\ scale);}
\DoxyCodeLine{00670\ \ \ \ \ vecDst[3]\ =\ (q31\_t)\ tmp64;}
\DoxyCodeLine{00671\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00672\ \textcolor{comment}{\ \ \ \ \ *\ set\ negative\ values\ to\ 0}}
\DoxyCodeLine{00673\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00674\ \ \ \ \ vecDst\ =\ vdupq\_m(vecDst,\ 0,\ vcmpltq\_n\_s32(vecIn,\ 0));}
\DoxyCodeLine{00675\ }
\DoxyCodeLine{00676\ \ \ \ \ \textcolor{keywordflow}{return}\ vecDst;}
\DoxyCodeLine{00677\ \}}
\DoxyCodeLine{00678\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00679\ }
\DoxyCodeLine{00680\ \textcolor{preprocessor}{\#if\ !defined(ARM\_DSP\_CONFIG\_TABLES)\ ||\ defined(ARM\_ALL\_FAST\_TABLES)\ ||\ defined(ARM\_TABLE\_FAST\_SQRT\_Q15\_MVE)}}
\DoxyCodeLine{00681\ \_\_STATIC\_INLINE\ q15x8\_t\ FAST\_VSQRT\_Q15(q15x8\_t\ vecIn)}
\DoxyCodeLine{00682\ \{}
\DoxyCodeLine{00683\ \ \ \ \ q31x4\_t\ \ \ \ \ \ \ \ \ vecTmpLev,\ vecTmpLodd,\ vecSignL;}
\DoxyCodeLine{00684\ \ \ \ \ q15x8\_t\ \ \ \ \ \ \ \ \ vecTmp0,\ vecTmp1;}
\DoxyCodeLine{00685\ \ \ \ \ q15x8\_t\ \ \ \ \ \ \ \ \ vecNrm,\ vecDst,\ vecIdx,\ vecSignBits;}
\DoxyCodeLine{00686\ }
\DoxyCodeLine{00687\ \ \ \ \ vecDst\ =\ vuninitializedq\_s16();}
\DoxyCodeLine{00688\ }
\DoxyCodeLine{00689\ \ \ \ \ vecSignBits\ =\ vclsq(vecIn);}
\DoxyCodeLine{00690\ \ \ \ \ vecSignBits\ =\ vbicq\_n\_s16(vecSignBits,\ 1);}
\DoxyCodeLine{00691\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00692\ \textcolor{comment}{\ \ \ \ \ *\ in\ =\ in\ <<\ no\_of\_sign\_bits;}}
\DoxyCodeLine{00693\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00694\ \ \ \ \ vecNrm\ =\ vshlq(vecIn,\ vecSignBits);}
\DoxyCodeLine{00695\ }
\DoxyCodeLine{00696\ \ \ \ \ vecIdx\ =\ vecNrm\ >>\ 8;}
\DoxyCodeLine{00697\ \ \ \ \ vecIdx\ =\ vecIdx\ <<\ 1;}
\DoxyCodeLine{00698\ }
\DoxyCodeLine{00699\ \ \ \ \ vecTmp0\ =\ vldrhq\_gather\_shifted\_offset\_s16(sqrtTable\_Q15,\ (uint16x8\_t)vecIdx);}
\DoxyCodeLine{00700\ }
\DoxyCodeLine{00701\ \ \ \ \ vecIdx\ =\ vecIdx\ +\ 1;}
\DoxyCodeLine{00702\ }
\DoxyCodeLine{00703\ \ \ \ \ vecTmp1\ =\ vldrhq\_gather\_shifted\_offset\_s16(sqrtTable\_Q15,\ (uint16x8\_t)vecIdx);}
\DoxyCodeLine{00704\ }
\DoxyCodeLine{00705\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecTmp1,\ vecNrm);}
\DoxyCodeLine{00706\ \ \ \ \ vecTmp0\ =\ vecTmp0\ -\/\ vecTmp1;}
\DoxyCodeLine{00707\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecTmp0,\ vecTmp0);}
\DoxyCodeLine{00708\ \ \ \ \ vecTmp1\ =\ vqrdmulhq(vecNrm,\ vecTmp1);}
\DoxyCodeLine{00709\ \ \ \ \ vecTmp1\ =\ vdupq\_n\_s16(0x1800)\ -\/\ vecTmp1;}
\DoxyCodeLine{00710\ \ \ \ \ vecTmp0\ =\ vqrdmulhq(vecTmp0,\ vecTmp1);}
\DoxyCodeLine{00711\ }
\DoxyCodeLine{00712\ \ \ \ \ vecSignBits\ =\ vecSignBits\ >>\ 1;}
\DoxyCodeLine{00713\ }
\DoxyCodeLine{00714\ \ \ \ \ vecTmpLev\ =\ vmullbq\_int(vecNrm,\ vecTmp0);}
\DoxyCodeLine{00715\ \ \ \ \ vecTmpLodd\ =\ vmulltq\_int(vecNrm,\ vecTmp0);}
\DoxyCodeLine{00716\ }
\DoxyCodeLine{00717\ \ \ \ \ vecTmp0\ =\ vecSignBits\ +\ 10;}
\DoxyCodeLine{00718\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00719\ \textcolor{comment}{\ \ \ \ \ *\ negate\ sign\ to\ apply\ register\ based\ vshl}}
\DoxyCodeLine{00720\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00721\ \ \ \ \ vecTmp0\ =\ -\/vecTmp0;}
\DoxyCodeLine{00722\ }
\DoxyCodeLine{00723\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00724\ \textcolor{comment}{\ \ \ \ \ *\ shift\ even\ elements}}
\DoxyCodeLine{00725\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00726\ \ \ \ \ vecSignL\ =\ vmovlbq(vecTmp0);}
\DoxyCodeLine{00727\ \ \ \ \ vecTmpLev\ =\ vshlq(vecTmpLev,\ vecSignL);}
\DoxyCodeLine{00728\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00729\ \textcolor{comment}{\ \ \ \ \ *\ shift\ odd\ elements}}
\DoxyCodeLine{00730\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00731\ \ \ \ \ vecSignL\ =\ vmovltq(vecTmp0);}
\DoxyCodeLine{00732\ \ \ \ \ vecTmpLodd\ =\ vshlq(vecTmpLodd,\ vecSignL);}
\DoxyCodeLine{00733\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00734\ \textcolor{comment}{\ \ \ \ \ *\ merge\ and\ narrow\ odd\ and\ even\ parts}}
\DoxyCodeLine{00735\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00736\ \ \ \ \ vecDst\ =\ vmovnbq\_s32(vecDst,\ vecTmpLev);}
\DoxyCodeLine{00737\ \ \ \ \ vecDst\ =\ vmovntq\_s32(vecDst,\ vecTmpLodd);}
\DoxyCodeLine{00738\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00739\ \textcolor{comment}{\ \ \ \ \ *\ set\ negative\ values\ to\ 0}}
\DoxyCodeLine{00740\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00741\ \ \ \ \ vecDst\ =\ vdupq\_m(vecDst,\ 0,\ vcmpltq\_n\_s16(vecIn,\ 0));}
\DoxyCodeLine{00742\ }
\DoxyCodeLine{00743\ \ \ \ \ \textcolor{keywordflow}{return}\ vecDst;}
\DoxyCodeLine{00744\ \}}
\DoxyCodeLine{00745\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00746\ }
\DoxyCodeLine{00747\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ defined\ (ARM\_MATH\_HELIUM)\ ||\ defined(ARM\_MATH\_MVEI)\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00748\ }
\DoxyCodeLine{00749\ \textcolor{preprocessor}{\#ifdef\ \ \ \_\_cplusplus}}
\DoxyCodeLine{00750\ \}}
\DoxyCodeLine{00751\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00752\ }
\DoxyCodeLine{00753\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
